#include "../../xor.h"


using namespace XOR;


class KeyboardDemo : public DefaultKeyboardListener
{

public:

   /* 
  	* Constructor
 	*/
	KeyboardDemo()
	{
        Controller * ctrl = Controller::GetInstance();
		ctrl->getKeyboard()->addListener(this);

        ctrl->setModel(new String2D("Keyboard Test (press any key to test)"));

        ctrl->getCamera()->getOrientation()->moveAlongFocalVector(9);
        
        ctrl->getModel()->addObject("white", new Cube(new Vector3D(-.5,-.5,-.5), 1.0f,  new Paint(Color::WHITE)));
        ctrl->getModel()->addObject("blue",  new Cube(new Vector3D(0,0,5), 1.0f,        new Paint(Color::BLUE)));
        ctrl->getModel()->addObject("green", new Cube(new Vector3D(0,5,0), 1.0f,        new Paint(Color::GREEN)));
        ctrl->getModel()->addObject("red",   new Cube(new Vector3D(5,0,0), 1.0f,        new Paint(Color::RED)));

        ctrl->run();
	}

	/* handlers (auto-generated by generate_key_handlers.sh */
    
    void handleKey(KeyUpEvent * kue)
    {
        cout << "HandleKey(*kue) called" << endl;
    }

	void handleKey_0() { cout << "handleKey_0()" << endl; }
	void handleKey_1() { cout << "handleKey_1()" << endl; }
	void handleKey_2() { cout << "handleKey_2()" << endl; }
	void handleKey_3() { cout << "handleKey_3()" << endl; }
	void handleKey_4() { cout << "handleKey_4()" << endl; }
	void handleKey_5() { cout << "handleKey_5()" << endl; }
	void handleKey_6() { cout << "handleKey_6()" << endl; }
	void handleKey_7() { cout << "handleKey_7()" << endl; }
	void handleKey_8() { cout << "handleKey_8()" << endl; }
	void handleKey_9() { cout << "handleKey_9()" << endl; }
	void handleKey_Keypad0() { cout << "handleKey_Keypad0()" << endl; }
	void handleKey_Keypad1() { cout << "handleKey_Keypad1()" << endl; }
	void handleKey_Keypad2() { cout << "handleKey_Keypad2()" << endl; }
	void handleKey_Keypad3() { cout << "handleKey_Keypad3()" << endl; }
	void handleKey_Keypad4() { cout << "handleKey_Keypad4()" << endl; }
	void handleKey_Keypad5() { cout << "handleKey_Keypad5()" << endl; }
	void handleKey_Keypad6() { cout << "handleKey_Keypad6()" << endl; }
	void handleKey_Keypad7() { cout << "handleKey_Keypad7()" << endl; }
	void handleKey_Keypad8() { cout << "handleKey_Keypad8()" << endl; }
	void handleKey_Keypad9() { cout << "handleKey_Keypad9()" << endl; }
	void handleKey_KeypadPeriod() { cout << "handleKey_KeypadPeriod()" << endl; }
	void handleKey_KeypadDivide() { cout << "handleKey_KeypadDivide()" << endl; }
	void handleKey_KeypadMultiply() { cout << "handleKey_KeypadMultiply()" << endl; }
	void handleKey_KeypadMinus() { cout << "handleKey_KeypadMinus()" << endl; }
	void handleKey_KeypadPlus() { cout << "handleKey_KeypadPlus()" << endl; }
	void handleKey_KeypadEnter() { cout << "handleKey_KeypadEnter()" << endl; }
	void handleKey_KeypadEqual() { cout << "handleKey_KeypadEqual()" << endl; }
	void handleKey_A() { cout << "handleKey_A()" << endl; }
	void handleKey_B() { cout << "handleKey_B()" << endl; }
	void handleKey_C() { cout << "handleKey_C()" << endl; }
	void handleKey_D() { cout << "handleKey_D()" << endl; }
	void handleKey_E() { cout << "handleKey_E()" << endl; }
	void handleKey_F() { cout << "handleKey_F()" << endl; }
	void handleKey_G() { cout << "handleKey_G()" << endl; }
	void handleKey_H() { cout << "handleKey_H()" << endl; }
	void handleKey_I() { cout << "handleKey_I()" << endl; }
	void handleKey_J() { cout << "handleKey_J()" << endl; }
	void handleKey_K() { cout << "handleKey_K()" << endl; }
	void handleKey_L() { cout << "handleKey_L()" << endl; }
	void handleKey_M() { cout << "handleKey_M()" << endl; }
	void handleKey_N() { cout << "handleKey_N()" << endl; }
	void handleKey_O() { cout << "handleKey_O()" << endl; }
	void handleKey_P() { cout << "handleKey_P()" << endl; } 
	void handleKey_Q() { cout << "handleKey_Q()" << endl; }
	void handleKey_R() { cout << "handleKey_R()" << endl; }
	void handleKey_S() { cout << "handleKey_S()" << endl; }
	void handleKey_T() { cout << "handleKey_T()" << endl; }
	void handleKey_U() { cout << "handleKey_U()" << endl; }
	void handleKey_V() { cout << "handleKey_V()" << endl; }
	void handleKey_W() { cout << "handleKey_W()" << endl; }
	void handleKey_X() { cout << "handleKey_X()" << endl; }
	void handleKey_Y() { cout << "handleKey_Y()" << endl; }
	void handleKey_Z() { cout << "handleKey_Z()" << endl; }
	void handleKey_a() { cout << "handleKey_a()" << endl; }
	void handleKey_b() { cout << "handleKey_b()" << endl; }
	void handleKey_c() { cout << "handleKey_c()" << endl; }
	void handleKey_d() { cout << "handleKey_d()" << endl; }
	void handleKey_e() { cout << "handleKey_e()" << endl; }
	void handleKey_f() { cout << "handleKey_f()" << endl; }
	void handleKey_g() { cout << "handleKey_g()" << endl; }
	void handleKey_h() { cout << "handleKey_h()" << endl; }
	void handleKey_i() { cout << "handleKey_i()" << endl; }
	void handleKey_j() { cout << "handleKey_j()" << endl; }
	void handleKey_k() { cout << "handleKey_k()" << endl; }
	void handleKey_l() { cout << "handleKey_l()" << endl; }
	void handleKey_m() { cout << "handleKey_m()" << endl; }
	void handleKey_n() { cout << "handleKey_n()" << endl; }
	void handleKey_o() { cout << "handleKey_o()" << endl; }
	void handleKey_p() { cout << "handleKey_p()" << endl; }
	void handleKey_q() { cout << "handleKey_q()" << endl; }
	void handleKey_r() { cout << "handleKey_r()" << endl; }
	void handleKey_s() { cout << "handleKey_s()" << endl; }
	void handleKey_t() { cout << "handleKey_t()" << endl; }
	void handleKey_u() { cout << "handleKey_u()" << endl; }
	void handleKey_v() { cout << "handleKey_v()" << endl; }
	void handleKey_w() { cout << "handleKey_w()" << endl; }
	void handleKey_x() { cout << "handleKey_x()" << endl; }
	void handleKey_y() { cout << "handleKey_y()" << endl; }
	void handleKey_z() { cout << "handleKey_z()" << endl; }
	void handleKey_F1() { cout << "handleKey_F1()" << endl; }
	void handleKey_F2() { cout << "handleKey_F2()" << endl; }
	void handleKey_F3() { cout << "handleKey_F3()" << endl; }
	void handleKey_F4() { cout << "handleKey_F4()" << endl; }
	void handleKey_F5() { cout << "handleKey_F5()" << endl; }
	void handleKey_F6() { cout << "handleKey_F6()" << endl; }
	void handleKey_F7() { cout << "handleKey_F7()" << endl; }
	void handleKey_F8() { cout << "handleKey_F8()" << endl; }
	void handleKey_F9() { cout << "handleKey_F9()" << endl; }
	void handleKey_F10() { cout << "handleKey_F10()" << endl; }
	void handleKey_F11() { cout << "handleKey_F11()" << endl; }
	void handleKey_F12() { cout << "handleKey_F12()" << endl; }
	void handleKey_Backspace() { cout << "handleKey_Backspace()" << endl; }
	void handleKey_Tab() { cout << "handleKey_Tab()" << endl; }
	void handleKey_Return() { cout << "handleKey_Return()" << endl; }
	void handleKey_Escape() { cout << "handleKey_Escape()" << endl; }
	void handleKey_Space() { cout << "handleKey_Space()" << endl; }
	void handleKey_Exclaim() { cout << "handleKey_Exclaim()" << endl; }
	void handleKey_DblQuote() { cout << "handleKey_DblQuote()" << endl; }
	void handleKey_Hash() { cout << "handleKey_Hash()" << endl; }
	void handleKey_Dollar() { cout << "handleKey_Dollar()" << endl; }
	void handleKey_Ampersand() { cout << "handleKey_Ampersand()" << endl; }
	void handleKey_SnglQuote() { cout << "handleKey_SnglQuote()" << endl; }
	void handleKey_LParen() { cout << "handleKey_LParen()" << endl; }
	void handleKey_RParen() { cout << "handleKey_RParen()" << endl; }
	void handleKey_Asterisk() { cout << "handleKey_Asterisk()" << endl; }
	void handleKey_Plus() { cout << "handleKey_Plus()" << endl; }
	void handleKey_Comma() { cout << "handleKey_Comma()" << endl; }
	void handleKey_Minus() { cout << "handleKey_Minus()" << endl; }
	void handleKey_Period() { cout << "handleKey_Period()" << endl; }
	void handleKey_FwdSlash() { cout << "handleKey_FwdSlash()" << endl; }
	void handleKey_Colon() { cout << "handleKey_Colon()" << endl; }
	void handleKey_Semicolon() { cout << "handleKey_Semicolon()" << endl; }
	void handleKey_Less() { cout << "handleKey_Less()" << endl; }
	void handleKey_Equal() { cout << "handleKey_Equal()" << endl; }
	void handleKey_Greater() { cout << "handleKey_Greater()" << endl; }
	void handleKey_Question() { cout << "handleKey_Question()" << endl; }
	void handleKey_At() { cout << "handleKey_At()" << endl; }
	void handleKey_LBracket() { cout << "handleKey_LBracket()" << endl; }
	void handleKey_RBracket() { cout << "handleKey_RBracket()" << endl; }
	void handleKey_BackSlash() { cout << "handleKey_BackSlash()" << endl; }
	void handleKey_Caret() { cout << "handleKey_Caret()" << endl; }
	void handleKey_Underscore() { cout << "handleKey_Underscore()" << endl; }
	void handleKey_BackQuote() { cout << "handleKey_BackQuote()" << endl; }
	void handleKey_Delete() { cout << "handleKey_Delete()" << endl; }
	void handleKey_Up() { cout << "handleKey_Up()" << endl; }
	void handleKey_Down() { cout << "handleKey_Down()" << endl; }
	void handleKey_Left() { cout << "handleKey_Left()" << endl; }
	void handleKey_Right() { cout << "handleKey_Right()" << endl; }
	void handleKey_Insert() { cout << "handleKey_Insert()" << endl; }
	void handleKey_Home() { cout << "handleKey_Home()" << endl; }
	void handleKey_End() { cout << "handleKey_End()" << endl; }
	void handleKey_PageUp() { cout << "handleKey_PageUp()" << endl; }
	void handleKey_PageDown() { cout << "handleKey_PageDown()" << endl; }
	void handleKey_NumLock() { cout << "handleKey_NumLock()" << endl; }
	void handleKey_CapsLock() { cout << "handleKey_CapsLock()" << endl; }
	void handleKey_ScrlLock() { cout << "handleKey_ScrlLock()" << endl; }
	void handleKey_PrtScrn() { cout << "handleKey_PrtScrn()" << endl; }
	void handleKey_SysReq() { cout << "handleKey_SysReq()" << endl; }
	void handleKey_Break() { cout << "handleKey_Break()" << endl; }

};


/**
 *  Tester Main
 */
int main(int argc, char **argv)
{
	KeyboardDemo * demo = new KeyboardDemo(); 
    return 0;
}

